<!--
 @description 经销商详情
 @fileName Detail.vue
 @author zengqiongying
 @created 2023/04/18 22:41:42
-->
<template>
  <div>
    <DetailBasic :detail="detail" />
  </div>
</template>

<script lang="ts">
  import { toRefs, reactive } from 'vue'
  import DetailBasic from './DetailBasic.vue'
  import { detail } from '@/apis/dealerMarketing/DealerChoice'
  import { useRoute } from 'vue-router'
  interface datasModle {
    detail: any
  }
  export default {
    name: 'DealerDetail',
    components: { DetailBasic },
    setup() {
      const $route = useRoute()
      const datas = reactive<datasModle>({
        detail: {}
      })
      const getDetail = () => {
        const code = `${$route.query?.code || ''}`
        detail(code).then((res) => {
          datas.detail = res?.data?.customerDetailDTO || ''
        })
      }
      getDetail()
      return {
        ...toRefs(datas)
      }
    }
  }
</script>
<style lang="less" scoped></style>
